package com.leoman.dao;

import com.leoman.entity.UserMoney;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * UserMoneyDao
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:47.
 */
public interface UserMoneyDao extends JpaRepository<UserMoney, Integer>, JpaSpecificationExecutor<UserMoney> {

    @Query("select a from UserMoney a where a.user.id = ?1 and a.createTime < ?2")
    List<UserMoney> findListByParams(Integer userId, Long createTime);
}